home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 71
/
MOBICLIC 71.ISO
/
mac
/
DATA
/
COMMUN
/
temp0001
/
00209_Script_GESTION_FLASH_AUDIO_FLASH
< prev
next >
Wrap
Text File
|
2004-12-05
|
4KB
|
119 lines
global gze_Label,g_ZFlashsound
property p_cettePiste, p_Nodepiste,p_SWF,pEscape,p_aiguillage, pNopisteSon,p_start,p_Musik,p_acteur
property p_nomaction,pNbFrames,pSilence,p_attente
----------------------------------
on getPropertyDescriptionList me
return [\
#pNopisteSon:[#comment:"No piste son:",#format:#integer,#range:[2,3,4,5,6,7,8],#default: 3],\
#p_aiguillage:[#comment:"branchement α la sortie :",#format:#string,#range:["frame suivante","marker suivant"],#default: "marker suivant"],\
#p_Musik:[#comment: "gestion musique?",#format: #string,#range:["la couper","la laisser","la relancer"], #default:"la laisser"],\
#p_attente:[#comment: "boucle d'attente α la fin du swf ?",#format: #boolean, #default:FALSE]\
]
end
----------------------------------------
on beginsprite me
p_Nodepiste = me.spriteNum
p_cettePiste = sprite(p_Nodepiste)
p_acteur = p_cettePiste.member.name
p_SWF = p_cettePiste.member
p_nomaction = p_SWF.name
fin = length(p_nomaction)
if p_nomaction.char[fin-1..fin] = "_M" then
pSilence = 1
else
pSilence = 0
end if
p_start = the frame
pEscape = p_cettePiste.endFrame
pNbFrames = p_SWF.framecount
gze_Label = the frameLabel
end
-----------------------------------
on prepareFrame me
global gFlagcurseur
if p_cettePiste.mouseOverButton then
if not(voidP(gFlagcurseur)) then
case(gFlagcurseur) of
280,260,290:
p_cettePiste.cursor = gFlagcurseur
end case
end if
else
p_cettePiste.cursor = -1
end if
end
--------------------------------
on exitFrame me
the soundKeepDevice = 0
if the frame = p_start then----------------sur la premiΦre frame du swf
case(p_musik) of----------------------on coupe Θventuellemnet la musique
"la couper":
coupeson(1)
niveauSon()
"la laisser":
nothing
"la relancer":
niveauSon()
puppetSound(1,"MUSIK_"&zRacine())
end case
else
if the frame = pEscape then----------------sur la derniΦre frame du swf
if voidP(g_ZFlashsound) then g_ZFlashsound = 0
case(g_ZFlashsound) of
0: --aucun son n'a ΘtΘ lancΘ
go the frame
1:
if not(soundBusy(pNopisteSon)) and p_cettePiste .playing = 0 then----------------si le son s'arrΩte et que le swf est arrΩtΘ
if p_cettePiste.frame = pNbFrames -1 then------------------------------------------si le swf est sur l'avant derniΦre frame
p_cettePiste.gotoframe(p_cettePiste.frame + 1)
case(p_attente) of
0:--si branchement en fin de swf
niveauSon()
aiguillage(p_aiguillage)---------------on sort de la boucle gloabale du swf dans Director
1:--si boucle d'attente en fin de swf
cursor 280
go the frame---------------------------on continue α boucler dans Director
end case
else
if p_cettePiste.frame = pNbFrames then------------------------------------------si le swf est sur la derniΦre frame
go the frame
else------------------------------------------si le swf n'est ni sur la derniΦre frame ni l'avant derniΦre
p_cettePiste.gotoframe(p_cettePiste.frame + 1)
play(p_cettePiste)
go the frame
end if
end if
else
go the frame
end if
end case
end if
end if
end
---------------------------------------
on aiguillage ZUT
case(ZUT) of
"frame suivante":------------------------------branchement α la frame suivante
go the frame +1
"marker suivant":------------------------------branchement au marker suivant
go marker(+1)
end case
end
------------------------------------
on mouseUp me
coupeson(pNopisteSon)
niveauSon()
--if p_cettePiste.frame = pNbFrames and p_attente = 0 then
if p_attente = 0 then
aiguillage(p_aiguillage)----------------------------------on sort de la boucle
end if
end
------------
on endSprite me
cursor -1
coupeson(pNopisteSon)
niveauSon()
end
----------------